﻿
add_compile_definitions("VLIB_SHARED")

file(GLOB_RECURSE CUSTOM_WIDGETS_HEADER 
"${CMAKE_SOURCE_DIR}/include/CustomWidgets/*.h"
"${CMAKE_SOURCE_DIR}/include/global/*.h")
file(GLOB_RECURSE CUSTOM_WIDGETS_SRC "${CMAKE_SOURCE_DIR}/CustomWidgets/*.cpp")

add_library(CustomWidgets SHARED ${CUSTOM_WIDGETS_HEADER} ${CUSTOM_WIDGETS_SRC})

#查找Qt依赖库
find_package(Qt5  5.9.3 REQUIRED COMPONENTS Core Gui Widgets)
set_target_properties(CustomWidgets 
PROPERTIES
    AUTOMOC ON
    AUTORCC ON
    AUTOUIC OFF)

target_include_directories(CustomWidgets 
PUBLIC 
    ${CMAKE_SOURCE_DIR}/include/CustomWidgets
    ${CMAKE_SOURCE_DIR}/include
)
target_link_libraries(CustomWidgets 
PUBLIC
    Qt5::Core 
    Qt5::Gui 
    Qt5::Widgets)